package cn.iocoder.yudao.module.shop.statistics.dal.mysql;

import cn.iocoder.yudao.framework.business.basic.dao.mapper.CoreMapper;
import cn.iocoder.yudao.module.shop.statistics.dal.dataobject.ShopStatisticsDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;

/**
 * 店铺统计 Mapper
 *
 * @author 山野羡民（1032694760@qq.com）
 */
@Mapper
public interface ShopStatisticsMapper extends CoreMapper<ShopStatisticsDO> {

    default ShopStatisticsDO selectByShopIdAndDate(@Param("shopId") Long shopId, @Param("date") LocalDate date) {
        return selectOne(ShopStatisticsDO::getShopId, shopId, ShopStatisticsDO::getDate, date);
    }

}
